-- Problem 1
-- If we list all the natural numbers below 10 that are multiples of 3 or 5, we get 3, 5, 6 and 9. The sum of these multiples is 23.
-- Find the sum of all the multiples of 3 or 5 below 1000.

-- Solution: multiples or 3 + mulitples of 5 - mulitples of 15
sum3 0 = 0
sum3 1 = 3
sum3 n = (n*3) + sum3(n-1)

sum5 0 = 0
sum5 1 = 5
sum5 n = n*5 + sum5(n-1)

sum15 0 = 0
sum15 1 = 15
sum15 n = n*15 + sum15(n-1)



main = print (sum3(truncate(999/3))+ sum5(truncate(999/5)) - sum15(truncate(999/15)))



--Note: 
--1. Functons name can't be started with capital